Push the process of waiting for devices to come up right out of DevController,
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 8 Nov 2005 02:34:23 +0000 (03:34 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 8 Nov 2005 02:34:23 +0000 (03:34 +0100)
commite10bc057a594481978ae9ea77fae93d2808bd49c
tree591916c45d23f4e10f0704789ad9dcbb155fc0a4
parentc311699be94ec51ce78dd532831a117e053aacf8
Push the process of waiting for devices to come up right out of DevController,
and drive this process from xm create.  Architecturally, this separates the
process of domain creation from the process of waiting for devices, allowing
tools to choose when to perform that wait (if at all).  This places the waiting
in the same category as the unpause after domain creation, architecturally.

The main advantage to this approach is that it takes waiting for devices out
of the scope of XendDomain's domains_lock.  When restarting a domain, the
watch would fire for @releaseDomain while we were waiting for new domains to
come up.  This would deadlock the watch thread, as no more new watches could
be delivered.  Closes bug #387.

In the longer term, we expect to be able to wait for devices to come up
completely, not simply to wait for the hotplug scripts to run, and so it is
necessary then to move the waiting procedure right out of the server, so that
it can be performed after the domain unpause.  Without unpausing the domain,
the frontends will not come up, and so we cannot detect successful device
completion.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendClient.py
tools/python/xen/xend/XendDomainInfo.py
tools/python/xen/xend/server/DevController.py
tools/python/xen/xend/server/SrvDomain.py
tools/python/xen/xm/create.py